<a id="member_logout" href="javascript:;" onclick="memberLogout('<?php echo $this->websiteUrl; ?>')">Logout</a>
<script type="text/javascript">
	function memberLogout(siteUrl) {
		var returnTo = document.location.href;
		var completeHref = siteUrl + 'sys/login/memberlogout?returnTo=' + returnTo.replace(siteUrl, '');
		document.location.href = completeHref;
	}
</script>